package cn.tedu.m2;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
//工作模式轮询发送
//我是消费者接受处理消息
@Component
public class Consumer {
    @RabbitListener(queues = "task_queue")
    public void getReceive1(String msg){
        System.out.println("1号消费者收到:"+msg);
    }

    @RabbitListener(queues = "task_queue")
    public void getReceive2(String msg){
        System.out.println("2号消费者收到"+msg);
    }

}
